package com.etc.wc.utils;

import java.io.IOException;
import java.util.Properties;

/**
 * 单列模式之一：饿汉模式
 * 配置文件的工具
 */
public class PropertyHolder {


    private static Properties prop = prop = new Properties();


    static {
        try {
            prop.load(PropertyHolder.class.getClassLoader().getResourceAsStream("collect.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private PropertyHolder(){}

    public static Properties getProperties() throws IOException {
        return prop;
    }
}
